-
Notifications
You must be signed in to change notification settings - Fork 139
refactor: add Expression::coalesce helper method #1648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+51
−69
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 21, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
==========================================
- Coverage 84.65% 84.65% -0.01%
==========================================
Files 123 123
Lines 34114 34109 -5
Branches 34114 34109 -5
==========================================
- Hits 28880 28875 -5
Misses 3905 3905
Partials 1329 1329 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b85bf5f to
287577f
Compare
nicklan
approved these changes
Jan 22, 2026
dengsh12
approved these changes
Jan 23, 2026
Collaborator
dengsh12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
287577f to
d64042f
Compare
DrakeLin
added a commit
that referenced
this pull request
Jan 23, 2026
## 🥞 Stacked PR Use this [link](https://github.com/delta-io/delta-kernel-rs/pull/1645/files) to review incremental changes. - [**stack/null-propagation**](#1645) [[Files changed](https://github.com/delta-io/delta-kernel-rs/pull/1645/files)] - [stack/coalesce](#1648) [[Files changed](https://github.com/delta-io/delta-kernel-rs/pull/1648/files/37e755009566511bf7c2f00e014c1647e77e4533..d64042f7908844ef2d8a1c68312dc3ff936d60dc)] - [stack/checkpoint-transforms](#1646) [[Files changed](https://github.com/delta-io/delta-kernel-rs/pull/1646/files/d64042f7908844ef2d8a1c68312dc3ff936d60dc..4e66ca004f89b23431a96ac106a9c0d400718b10)] - [stack/write-stats](#1643) [[Files changed](https://github.com/delta-io/delta-kernel-rs/pull/1643/files/4e66ca004f89b23431a96ac106a9c0d400718b10..cd64f79fd3b40ebfa811cb333369cb17aa1a2a74)] --------- ## What changes are proposed in this pull request? Fixes a bug in nested transform expression evaluation where null rows in the source struct were losing their null bitmap, causing null structs to incorrectly appear as non-null structs with null fields. When evaluating nested transform expressions (transforms with an input_path that operate on a nested struct), the output StructArray was created with None for the null buffer: `let data = StructArray::try_new(output_fields.into(), output_cols, None)?;` This meant that if the source struct had null rows (e.g., an add action that is null in a checkpoint batch), the output would lose that null information. The struct would appear as non-null but with all-null fields, which is semantically different. ## How was this change tested? Existing transform tests pass. The stats transform integration tests (in a follow-up PR) exercise this code path.
d64042f to
e9f2b41
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Use this link to review incremental changes.
What changes are proposed in this pull request?
This PR adds an
Expression::coalescehelper method to simplify creating COALESCE expressions, and updates all existing call sites to use the new helper.How was this change tested?
Existing tests